package net.zjitc.service.impl;

import net.zjitc.dao.UserDao;
import net.zjitc.dao.impl.UserDaoImpl;
import net.zjitc.domain.user;
import net.zjitc.service.UserService;

import java.sql.SQLException;

/**
 * @Author admin
 * @Date 2019/3/4 10:06
 */
public class UserServiceImpl implements UserService{
    UserDao dao = new UserDaoImpl();
    @Override
    public user login(String username, String password){
        return dao.login(username,password);
    }

    @Override
    public user register(String username) {
        return dao.register(username);
    }

    @Override
    public void register_add(String username, String password) throws SQLException {
        dao.register_add(username,password);
    }

    @Override
    public user findByID(int uid) throws SQLException {
        return dao.findByID(uid);
    }

    @Override
    public void center_edit(user user, String uid) throws SQLException {
        dao.center_edit(user,uid);
    }
}
